Skip to content

chore(atak): 104 — pick newest APK by modtime in install_device.sh - #108

Merged
jdev-02 merged 2 commits into
mainfrom
jon/triv-104-install-device-modtime
May 3, 2026
Merged

chore(atak): 104 — pick newest APK by modtime in install_device.sh#108
jdev-02 merged 2 commits into
mainfrom
jon/triv-104-install-device-modtime

Conversation

@jdev-02

@jdev-02 jdev-02 commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary

atak/plugin/scripts/install_device.sh was selecting the APK to push via
find … *.apk | sort | tail -n 1, which is lexicographic order — a 1.2.10
APK would lex-sort before 1.2.2 and silently install the older build.
Swap to ls -1t so the most-recently-built artifact wins. Tiny helper
function so we don't repeat the path twice. ls -t is portable across
macOS (BSD) and Jetson (GNU).

Why this is trivial

Single 12-line shell diff in one file (atak/plugin/scripts/install_device.sh),
no behaviour change for the happy path of a single fresh APK, no new deps.
bash -n parses cleanly; make shellcheck-syntax, make lint, and make test
(332 tests) all pass.

Closes #104.

The previous `find ... | sort | tail` form selected APKs by lexicographic
order, which silently mis-ranks versions where a higher-numbered build
sorts before a lower one (e.g. v1.2.10 before v1.2.2). Switch to `ls -t`
so the freshest build artifact is always installed, matching dev intent.

Closes #104.
@jdev-02
jdev-02 requested a review from benschwierking as a code owner May 3, 2026 08:46
@jdev-02
jdev-02 merged commit af31718 into main May 3, 2026
2 checks passed
@jdev-02
jdev-02 deleted the jon/triv-104-install-device-modtime branch May 3, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(atak): install_device.sh should pick newest APK by modtime, not lex order

1 participant